home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Softdisk Supreme
/
Softdisk Supreme.iso
/
pc
/
DSK Files
/
0-49
/
SD013b.dsk
/
FIGURE.DRAWER.bas
< prev
next >
Wrap
BASIC Source File
|
2003-06-12
|
5KB
|
120 lines
5 TEXT : HOME
6 GOSUB 1400
8 HOME
10 GOSUB 3000
50 HGR
60 HOME : VTAB 22: PRINT "DO YOU WANT TO USE A PREVIOUSLY-SAVED DRAWING? ": INPUT G$
70 IF LEFT$(G$,1) = "Y" THEN 11500
80 IF LEFT$(G$,1) < >"N" THEN 60
90 GOTO 102
100 CLEAR
101 SP = 1
102 ONERR GOTO 1150
400 ONERR GOTO 401
401 PRINT : PRINT : INPUT "ENTER X COORDINATE (0 TO 279) ";X5
409 ONERR GOTO 410
410 INPUT "ENTER Y COORDINATE (0 TO 159) ";X6
425 INPUT "DO YOU WANT CIRCLES(C) OR SPIRALS(S) ";AA$
430 IF AA$ = "S" THEN 2000
440 IF AA$ < >"C" THEN 100
490 PRINT : PRINT : IF SP = 0 THEN SPEED= 150
500 PRINT "(A SIZE OF .2 IS ABOUT THE SMALLEST AND A SIZE OF 7.8 WILL JUST FIT FROM TOP TO BOTTOM)"
505 INPUT "ENTER SIZE --- (FROM .2 TO 20) ";AA
510 IF AA >20 THEN VTAB 22: PRINT "TOO LARGE": GOTO 500
540 PRINT
550 INPUT "CIRCLE = 1 ARCH = 2 DIP =3 RIGHT SEMI-CIRCLE = 4 LEFT SEMI-CIRCLE = 5 ";BB
570 PRINT : PRINT : PRINT "DO YOU WANT:": PRINT " DOTS (D) ": INPUT " SOLID LINES (L) OR FILLED-IN (F) ";DO$
575 IF DO$ = "L" THEN LL = 1
578 IF DO$ = "F" THEN FI = 1:FL = 1
580 HCOLOR= 3
585 SPEED= 255:SP = 1
590 ONERR GOTO 11000
600 ON BB GOTO 700,800,850,900,950
700 FOR A = 0 TO 360 STEP ( INT(8/AA) +1): GOTO 1000
800 FOR A = 0 TO 180 STEP 4: GOTO 1000
850 FOR A = 180 TO 360 STEP 4: GOTO 1000
900 FOR A = 90 TO 270 STEP 4: GOTO 1000
950 FOR A = 270 TO 450 STEP 4
1000 IF FI = 1 THEN 1200
1005 B = A/57.3:R = 10 *AA:X = R * COS(B):Y = R * SIN(B):XX = X *1.18 +X5:YY = X6 -Y
1010 IF XX >280 THEN XX = 280: GOTO 1060
1020 IF XX <1 THEN XX = 1: GOTO 1060
1030 IF YY >160 THEN YY = 160: GOTO 1060
1040 IF YY <1 THEN YY = 1: GOTO 1060
1045 IF LL = 1 THEN 1070
1050 HPLOT XX,YY:L2 = 1
1060 Y9 = YY:X9 = XX: NEXT A
1070 IF L2 = 0 THEN 1050
1080 HPLOT X9,Y9 TO XX,YY
1095 GOTO 1060
1100 GOTO 11000
1150 HOME : VTAB 22: PRINT "ILLEGAL QUANTITIES ..... TRY AGAIN ": FOR I = 1 TO 500: GOTO 100
1200 B = A/57.3:R = 10 *AA:X = R * COS(B):Y = R * SIN(B):XX = X *1.18 +X5:YY = X6 -Y
1220 IF XX >280 THEN XX = 280: GOTO 1280
1230 IF XX <1 THEN XX = 1: GOTO 1280
1240 IF YY >160 THEN YY = 160: GOTO 1280
1250 IF YY <1 THEN YY = 1: GOTO 1280
1260 IF FL = 1 THEN 1290
1270 HPLOT XX,YY:L2 = 1
1275 Y9 = YY:X9 = XX
1280 NEXT A
1290 IF L2 = 0 THEN 1270
1300 HPLOT X9,Y9 TO XX,YY
1310 GOTO 1280
1400 VTAB 5: FOR I = 1 TO 15: PRINT "*";: HTAB 38: PRINT "*": NEXT I
1410 VTAB 5: FOR I = 2 TO 37: HTAB I: PRINT "*";: NEXT I
1420 VTAB 19: FOR I = 2 TO 37: HTAB I: PRINT "*";: NEXT I
1430 VTAB 7: HTAB 7: PRINT "F I G U R E D R A W E R": VTAB 9: HTAB 5: PRINT "BY JACK WILCOX AND PAUL WILCOX"
1440 VTAB 12: HTAB 2: PRINT " YOU CAN DRAW CIRCLES, SEMI-CIRCLES,": VTAB 14: HTAB 3: PRINT "SPIRALS OR ALMOST ANY STRAIGHT": VTAB 16: HTAB 3: PRINT "SIDED FIGURE. THE CIRCLES CAN BE": VTAB 18: HTAB 3: PRINT "EITHER EMPTY OR FILLED-IN."
1450 VTAB 23: INPUT "PRESS RETURN TO BEGIN ";G$
1460 IF G$ = "" THEN RETURN
1470 GOTO 1450
1500 HCOLOR= 0
1510 IF AA$ = "C" THEN 600
1520 IF AA$ = "S" THEN 2035
1550 GOTO 11000
2000 PRINT : PRINT : PRINT : PRINT : IF SP = 0 THEN SPEED= 150
2001 PRINT "YOU CAN DRAW SPIRALS OR ALMOST ANY STRAIGHT-SIDED FIGURE, DEPENDING ON YOURANSWER TO THE NEXT QUESTION."
2002 PRINT " (TRY ANYTHING FROM 1 TO 280)"
2003 SPEED= 255
2004 FOR I = 1 TO 4000: NEXT
2005 INPUT "SEPARATION OF POINTS IN DEGREES? ";D:D = D/57.29578
2010 PRINT : INPUT "DO YOU WANT DOTS (D) OR LINES (L): ";S$
2014 IF S$ < >"L" AND S$ < >"D" THEN 2010
2020 PRINT : INPUT "RELATIVE LENGTHS OF X AND Y (X,Y)";A,B
2025 ONERR GOTO 11000
2030 HCOLOR= 3
2035 HPLOT X5,X6
2040 FOR R = 0 TO 200 STEP D
2050 X = R * COS(R):Y = R * SIN(R):X = X *A:Y = Y *B
2060 X = X +X5:Y = Y +X6: IF X <0 OR X >280 OR Y <0 OR Y >160 THEN 11000
2070 IF S$ = "D" GOTO 2090
2080 HPLOT TO X,Y: GOTO 2100
2090 HPLOT X,Y
2100 NEXT R
2110 GOTO 11000
2120 END
3000 HGR : PRINT CHR$(4);"BLOAD DRAWER.DEMS"
3010 HOME : VTAB 22: PRINT "THIS IS A DEMONSTRATION OF SOME OF THE FIGURES YOU CAN DRAW."
3020 INPUT "PRESS 'RETURN' TO CONTINUE";G$: RETURN
3100 HGR : PRINT CHR$(4);"BLOAD DRAWER.DEMS"
11000 PRINT : PRINT : INPUT "IS THAT WHAT YOU WANT? CONTINUE(C) ERASE(E)";A$
11002 IF LEFT$(A$,1) = "E" THEN 1500
11003 IF LEFT$(A$,1) = "C" THEN HCOLOR= 3: GOTO 11005
11004 GOTO 11000
11005 PRINT : PRINT : INPUT "DO YOU WANT ANOTHER FIGURE? ";A$: IF LEFT$(A$,1) = "Y" THEN L2 = 0:LL = 0: GOTO 100
11010 INPUT "DO YOU WANT TO SAVE THIS TO DISK? ";G$: IF LEFT$(G$,1) = "Y" THEN 12000
11020 IF LEFT$(G$,1) < >"N" THEN 11010
11030 GOTO 12020
11500 INPUT "NAME OF PICTURE? ";NA$: GOTO 11505
11505 ONERR GOTO 11507
11506 GOTO 11510
11507 TEXT : PRINT CHR$(4);"CATALOG": GOTO 11500
11510 HGR : PRINT CHR$(4);"BLOAD";NA$
11520 GOTO 100
12000 PRINT : PRINT : INPUT "PICTURE NAME ";NA$
12010 PRINT CHR$(4);"BSAVE";NA$;",A$2000,L$1FF8"
12020 INPUT "CONTINUE (C) OR END (E)?";A$
12030 IF LEFT$(A$,1) = "C" THEN 100
12040 IF LEFT$(A$,1) < >"E" THEN 12020
12050 TEXT : HOME : END